var modules = {
  './src/title.js':(module,exports,require)=>{
    require.rankEsModule(exports);//标示 这是一个ES模块 所有的属性访求 都是一个字段
    require.defineProperties(exports,{
      default:()=>DEFAULT_EXPORTS,
      age:()=>age
    });
    const DEFAULT_EXPORTS = 'title_default';
    const age = 'title_age';
  }
}
var cache = {};
function require(moduleId) {
  var cachedModule = cache[moduleId];
  if (cachedModule !== undefined) {
    return cachedModule.exports;
  }
  var module = cache[moduleId] = {
    exports: {}
  };
  modules[moduleId](module, module.exports, require);
  return module.exports;
}
require.rankEsModule = (exports)=>{
  Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'});//toString [Object Module]
  Object.defineProperty(exports,'__esModule',{value:true});// exports.__esModule=true;
}
require.ownProperty = (obj, prop) => obj.hasOwnProperty(prop)
require.defineProperties= (exports,definition)=>{
  for(let key in definition){
    //Cannot access 'DEFAULT_EXPORTS' before initialization
    //exports.key = definition[key]();
    if(require.ownProperty(definition,key)){
      Object.defineProperty(exports,key,{enumerable:true,get:definition[key]});
    }
  }
}
//返回获取default默认导出的getter方法
require.needDefault = function(module){
  let getter = module.__esModule?()=>module.default:()=>module;
  return getter;
}
/**
 * 1.defineProperty可以更精确的配置enumerable:true
 * 2.更重要的是可以延迟取值
 */
var exports = {};
require.rankEsModule(exports);
let title = require('./src/title.js');
let title_default = require.needDefault(title);
console.log(title_default());
console.log(title.age);
